import { useRequest } from 'vue-request';
import axios from 'axios';

interface Region {
  /** IP */
  origin: string;
  /** 地址 */
  address: string;
}

const getUsers = async () => {
  const results = await axios.get('/test');
  return results.data;
};

export default () => {
  const res = useRequest<Region>(getUsers);
  return res;
};
